package com.four.service.impl;
/*
 * @author 王玉柱
 * @date 2021年10月25日 10:49
 */

import com.four.dao.IMemberDao;
import com.four.pojo.*;
import com.four.service.IMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("memberService")
public class MemberService implements IMemberService {

    @Autowired
    @Qualifier("iMemberDao")
    public IMemberDao iMemberDao;


    @Override
    public List<OurMember> selectAll() {
        return iMemberDao.selectAll();
    }

    @Override
    public Member selectOne(int id) {
        return iMemberDao.selectOne(id);
    }

    @Override
    public List<MemberCar> selectOne1(Integer id) {
        return iMemberDao.selectOne1(id);
    }

    @Override
    public List<Card> selectOne2(Integer id) {
        return iMemberDao.selectOne2(id);
    }

    @Override
    public List<Gift> selectOne3(Integer id) {
        return iMemberDao.selectOne3(id);
    }

    @Override
    public List<GiftDetails> selectOneGift(Integer id) {
        return iMemberDao.selectOneGift(id);
    }

    @Override
    public List<Orders> selectOneMemberOrder(Integer id) {
        return iMemberDao.selectOneMemberOrder(id);
    }

    @Override
    public int addOneMember(AddMember addMember) {
        iMemberDao.addOneMember(addMember);
        return iMemberDao.findMid(addMember);
    }

    @Override
    public int addOneMemberCar(AddMember addMember) {
        return iMemberDao.addOneMemberCar(addMember);
    }

    @Override
    public Member findOneMember(String parameter) {
        return iMemberDao.findOneMember(parameter);
    }

    @Override
    public List<Orders> findOneMemberOrders(Integer mid) {
        return iMemberDao.findOneMemberOrders(mid);
    }

    @Override
    public List<Iintegrals> findOneMemberIintegrals(Integer mid) {
        return iMemberDao.findOneMemberIintegrals(mid);
    }

    @Override
    public int updateOneMemberController(Member member) {
        return iMemberDao.updateOneMemberController(member);
    }

    @Override
    public int add_Car(MemberCar car) {
        return iMemberDao.add_Car(car);
    }

    @Override
    public MemberCar toEdit_Car(Integer cid) {
        return iMemberDao.toEdit_Car(cid);
    }

    @Override
    public int edit_Car(MemberCar memberCar) {
        return iMemberDao.edit_Car(memberCar);
    }

    @Override
    public int del_Car(int cid) {
        return iMemberDao.del_Car(cid);
    }

    @Override
    public List<Staff> selectOne5() {
        return iMemberDao.selectOne5();
    }

    @Override
    public int add_Pcard(Card card) {
        return iMemberDao.add_Pcard(card);
    }

    @Override
    public Card selectOne6(int id) {
        return iMemberDao.selectOne6(id);
    }

    @Override
    public int pcard_Upgrade(Card card) {
        return iMemberDao.pcard_Upgrade(card);
    }

    @Override
    public int pcard_Recharge(Card card) {
        return iMemberDao.pcard_Recharge(card);
    }

    @Override
    public int pcard_delete(int id) {
        return iMemberDao.pcard_delete(id);
    }

    @Override
    public int add_Ycard(Card card) {
        return iMemberDao.add_Ycard(card);
    }

    @Override
    public int add_Spree(Gift gift) {
        iMemberDao.add_Spree(gift);
        return iMemberDao.selectgid();

    }

    @Override
    public int add_GiftDetails1(GiftDetails giftDetails) {
        return iMemberDao.add_GiftDetails1(giftDetails);
    }

    @Override
    public int add_GiftDetails2(GiftDetails giftDetails) {
        return iMemberDao.add_GiftDetails2(giftDetails);
    }

    @Override
    public int add_GiftDetails3(GiftDetails giftDetails) {
        return iMemberDao.add_GiftDetails3(giftDetails);
    }

}
